home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Windows 95 Programs
/
Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso
/
1469
/
options.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1996-07-28
|
10KB
|
326 lines
VERSION 4.00
Begin VB.Form frmOptions
BorderStyle = 1 'Fixed Single
Caption = "VBMax Electronic Message Demo - Options"
ClientHeight = 5160
ClientLeft = 1350
ClientTop = 1230
ClientWidth = 6615
Height = 5565
Icon = "Options.frx":0000
Left = 1290
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5160
ScaleWidth = 6615
ShowInTaskbar = 0 'False
Top = 885
Width = 6735
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "&Close"
Height = 435
Left = 4380
TabIndex = 26
Top = 4560
Width = 2175
End
Begin VB.Frame Frame1
Caption = "Update interval"
Height = 1170
Left = 60
TabIndex = 9
Top = 3840
Width = 1935
Begin VB.TextBox txtInterval
Height = 315
Left = 1140
MaxLength = 4
TabIndex = 11
Text = "20"
Top = 300
Width = 615
End
Begin VB.CommandButton cmdUpdateInterval
Caption = "Set Interval"
Height = 315
Left = 120
TabIndex = 12
Top = 720
Width = 1695
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Milliseconds:"
Height = 195
Left = 180
TabIndex = 10
Top = 360
Width = 900
End
End
Begin VB.Frame Frame2
Caption = "Scroll amount"
Height = 1695
Left = 60
TabIndex = 4
Top = 2040
Width = 1935
Begin VB.OptionButton optScrollAmount
Caption = "One segment"
Height = 315
Index = 0
Left = 180
TabIndex = 5
Top = 360
Value = -1 'True
Width = 1575
End
Begin VB.OptionButton optScrollAmount
Caption = "Two segments"
Height = 315
Index = 1
Left = 180
TabIndex = 6
Top = 660
Width = 1575
End
Begin VB.OptionButton optScrollAmount
Caption = "Three segments"
Height = 315
Index = 2
Left = 180
TabIndex = 7
Top = 960
Width = 1575
End
Begin VB.OptionButton optScrollAmount
Caption = "Entire character"
Height = 315
Index = 3
Left = 180
TabIndex = 8
Top = 1260
Width = 1575
End
End
Begin VB.Frame Frame4
Caption = "Colors"
Height = 1170
Left = 4380
TabIndex = 20
Top = 2040
Width = 2175
Begin VB.CommandButton cmdBackColor
Caption = "Set Back Color"
Height = 315
Left = 120
TabIndex = 22
Top = 720
Width = 1935
End
Begin VB.CommandButton cmdForeColor
Caption = "Set Fore Color"
Height = 315
Left = 120
TabIndex = 21
Top = 360
Width = 1935
End
End
Begin VB.Frame Frame3
Caption = "Scrolling"
Height = 2970
Left = 2220
TabIndex = 13
Top = 2040
Width = 1935
Begin VB.CommandButton cmdPause
Caption = "Stop"
Height = 315
Left = 180
TabIndex = 18
Top = 2160
Width = 1575
End
Begin VB.CommandButton cmdRestart
Caption = "Restart"
Height = 315
Left = 180
TabIndex = 19
Top = 2520
Width = 1575
End
Begin VB.Frame Frame8
Caption = "Pause"
Height = 1290
Left = 120
TabIndex = 14
Top = 420
Width = 1695
Begin VB.CommandButton cmdSetPause
Caption = "Pause"
Height = 315
Left = 120
TabIndex = 17
Top = 840
Width = 1455
End
Begin VB.TextBox txtPauseInterval
Height = 315
Left = 900
MaxLength = 4
TabIndex = 16
Text = "5"
Top = 300
Width = 615
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Seconds:"
Height = 195
Left = 180
TabIndex = 15
Top = 360
Width = 675
End
End
End
Begin VB.Frame Frame7
Caption = "Other options"
Height = 1110
Left = 4380
TabIndex = 23
Top = 3300
Width = 2175
Begin VB.CheckBox chkNotifyWhenFinished
Caption = "Notify when finished"
Height = 315
Left = 180
TabIndex = 25
Top = 660
Width = 1935
End
Begin VB.CheckBox chkShowGrid
Caption = "Show grid"
Height = 315
Left = 180
TabIndex = 24
Top = 300
Value = 1 'Checked
Width = 1215
End
End
Begin VB.Frame Frame5
Caption = "Caption"
Height = 1215
Left = 60
TabIndex = 1
Top = 660
Width = 6495
Begin VB.TextBox txtCaption
Height = 315
Left = 180
TabIndex = 2
Text = "VBMax Electronic Message ~~~ Try it out - type your own message here. ~~~ "
Top = 360
Width = 6075
End
Begin VB.CommandButton cmdSetCaption
Caption = "Change caption"
Height = 315
Left = 180
TabIndex = 3
Top = 780
Width = 6075
End
End
Begin VB.PictureBox picDisplay
Height = 510
Left = 60
ScaleHeight = 450
ScaleWidth = 6435
TabIndex = 0
Top = 60
Width = 6495
End
Attribute VB_Name = "frmOptions"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Dim moEDisp As New CElectronicDisplay
Private Sub Form_Load()
Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
With moEDisp
.BackColor = &H800000
.ForeColor = &HFFFF00
Set .Container = picDisplay
.Caption = txtCaption.Text
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
moEDisp.Shutdown
Set moEDisp = Nothing
Set frmOptions = Nothing
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub optScrollAmount_Click(Index As Integer)
moEDisp.ScrollAmount = Index
End Sub
Private Sub txtCaption_GotFocus()
With txtCaption
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
Private Sub txtInterval_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 48 To 57, 8
Case Else: KeyAscii = 0
End Select
End Sub
Private Sub cmdUpdateInterval_Click()
If Len(txtInterval.Text) > 0 Then moEDisp.Interval = CInt(txtInterval.Text)
End Sub
Private Sub txtPauseInterval_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 48 To 57, 8
Case Else: KeyAscii = 0
End Select
End Sub
Private Sub cmdSetPause_Click()
moEDisp.Pause txtPauseInterval.Text
End Sub
Private Sub cmdPause_Click()
moEDisp.Pause
End Sub
Private Sub cmdRestart_Click()
moEDisp.Restart
End Sub
Private Sub cmdForeColor_Click()
moEDisp.SelectForeColor
End Sub
Private Sub cmdBackColor_Click()
moEDisp.SelectBackColor
End Sub
Private Sub cmdSetCaption_Click()
moEDisp.Caption = txtCaption.Text
End Sub
Private Sub chkShowGrid_Click()
With moEDisp
.ShowGrid = Not .ShowGrid
End With
End Sub
Private Sub chkNotifyWhenFinished_Click()
With moEDisp
.NotifyWhenFinished = Not .NotifyWhenFinished
End With
End Sub
Public Sub VBMaxElectronicDisplay_Finished(roEDisp As CElectronicDisplay)
MsgBox "The message """ & roEDisp.Caption & """ has reached the end.", vbInformation
End Sub